package generator

import "beergo/plugins/maker"

func init() {
	LdMerchantFundFlow()
}

func LdMerchantFundFlow() {
	c := maker.CreateTable("LdMerchantFundFlow","资金记录","ld")
	c.AddManyToOne("user","用户","sys.User").SetSrc("sys.User")
	c.AddInt("type","类型")//类型 0:支出 1:收入
	c.AddInt("status","状态")// 0:未支付 1:交易成功
	c.AddText("remarks","交易备注")
	c.AddFloat("amount","金额").SetDecimals(2).SetDigits(10)//金额 收入正数|支出负数
	c.AddFloat("balance","余额").SetDecimals(2).SetDigits(10)
	c.AddText("serialNo","流水号")
	c.AddText("trade_no","平台唯一交易号")
	c.AddText("pay_trade_no","支付平台交易号")
	c.AddCreateAt()
	c.AddUpdateAt()
	c.Generate()
}
